import { post, get } from '@/utils/request'

/**
 * 获取登录码
 */
export function getCodeKey (code) {
	return post('/system/auth/wxCode', Object.assign({
		code,
		type: 'HTN'
	}))
}

/**
 * 用户登录
 */
export function login (data) {
	return post('/system/auth/wx-login', Object.assign({
		codeKey: null,
		encryptedData: null,
		offset: null,
		type: 34
	}, data))
}
